window.onload=init;

function init(){
    initLayout();
}

function initLayout(){
    var width = document.documentElement.clientWidth;//可见区域宽度
    var height = document.documentElement.clientHeight;//可见区域高度
    //alert(width+':'+height);
    var headDiv = document.getElementById('Header');
    var pageBodyDiv = document.getElementById('PageBody');
    //alert('head height' + headDiv.offsetHeight);//获取div的高度height
    var headDivHeight = headDiv.offsetHeight;
    pageBodyDiv.style.height = height - headDivHeight + 'px';//设置高度需要加上单位px
    //alert('pageBody height:' + pageBodyDiv.offsetHeight);
    
}
